package com.tarena.elts.net;

import com.tarena.elts.ui.ClientContext;
import com.tarena.elts.ui.ExamFrame;
import com.tarena.elts.ui.LoginFrame;
import com.tarena.elts.ui.MenuFrame;
import com.tarena.elts.ui.WelcomeWindows;
import com.tarena.elts.util.Config;

public class ClinetMain {
	public static void main(String[] args){
		Config config = new Config("client.properties");
		LoginFrame loginFrame = new LoginFrame();
		MenuFrame menuFrame = new MenuFrame();
		ExamFrame examFrame = new ExamFrame();
		WelcomeWindows welcomeWindows = new WelcomeWindows();
		
		ClientContext clientContext = new ClientContext();
		
		ExamServiceAgent examService = new ExamServiceAgent();
		
		loginFrame.setClientContext(clientContext);
		examFrame.setClientContext(clientContext);
		menuFrame.setClientContext(clientContext);
		
		clientContext.setExamFrame(examFrame);
		clientContext.setLoginFrame(loginFrame);
		clientContext.setMenuFrame(menuFrame);
		clientContext.setWelcomeWindows(welcomeWindows);
		clientContext.setExamService(examService);
		examService.setConfig(config);
		clientContext.showUI();
	}
}
